<?php


use yii\helpers\Url;
use yii\helpers\Html;
use yii\grid\GridView;
use backend\modules\rbac\components\RouteRule;
use backend\modules\rbac\components\Configs;
use backend\modules\rbac\components\Helper;

/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */
/* @var $searchModel backend\modules\rbac\models\searchs\AuthItem */


$this->title = '角色列表';
$this->params['breadcrumbs'][] = $this->title;


?>
<div class="ibox float-e-margins" id="bx_search_form">
    <div class="ibox-title">

      <?= Html::a('添加', '#', ['class' => 'btn btn-primary BX_action_null','data-href'=>Url::to(['create'])]) ?>
      <?= Html::a('编辑', '#', ['class' => 'btn btn-warning  BX_action_id','data-href'=>Url::to(['update'])]) ?>

      <?= Html::a('查看', '#', ['class' => 'btn btn-success  BX_action_id','data-href'=>Url::to(['view'])]) ?>
      <?= Html::a('删除', '#', ['class' => 'btn btn-danger  BX_action_id_jump','data-href'=>Url::to(['delete'])]) ?>

    </div>

</div>



<div class="ibox-content">
  <div class="role-index">

      <?=
      GridView::widget([
         'options' => ['class' => 'grid-view','id' => 'grid'],
          'dataProvider' => $dataProvider,
          'filterModel' => $searchModel,
          'columns' => [
            [
              'class' => 'yii\grid\CheckboxColumn',
              'multiple'=> true,
              //'cssClass'=>'t',
              'name' => 'grid',
              'checkboxOptions'=>['class'=>'grid']
            ],
              [
                  'attribute' => 'name',
              ],
              [
                'attribute' => 'description',
              ],
              [
                  'attribute' => 'ruleName',
                  'filter' => Helper::getRulesArr()
              ],

             // ['class' => 'yii\grid\ActionColumn',],
          ],
      ])
      ?>

  </div>
</div>
